package com.ruoyi.index.controller;

import java.util.List;
// import javax.servlet.http.HttpServletResponse;

// import com.ruoyi.common.core.domain.entity.SysUser;
// import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
// import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ruoyi.common.annotation.DataScope;
// import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
// import com.ruoyi.common.core.domain.AjaxResult;
// import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.achievements.domain.JwTeachAchievements;
import com.ruoyi.achievements.service.IJwTeachAchievementsService;
import com.ruoyi.awards.domain.JwCompetitionAwards;
import com.ruoyi.awards.service.IJwCompetitionAwardsService;
import com.ruoyi.courses.domain.JwCourses;
import com.ruoyi.courses.service.IJwCoursesService;
import com.ruoyi.honors.domain.JwTeachHonors;
import com.ruoyi.honors.service.IJwTeachHonorsService;
import com.ruoyi.projects.domain.JwEduReformProjects;
import com.ruoyi.projects.service.IJwEduReformProjectsService;
import com.ruoyi.textbooks.domain.JwTextbooks;
import com.ruoyi.textbooks.service.IJwTextbooksService;
// import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 教学成果奖Controller
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@RestController
@RequestMapping("/index/index")
public class IndexController extends BaseController {
    @Autowired
    private IJwTeachAchievementsService jwTeachAchievementsService;
    @Autowired
    private IJwCompetitionAwardsService jwCompetitionAwardsService;
    @Autowired
    private IJwCoursesService jwCoursesService;
    @Autowired
    private IJwTeachHonorsService jwTeachHonorsService;
    @Autowired
    private IJwEduReformProjectsService jwEduReformProjectsService;
    @Autowired
    private IJwTextbooksService jwTextbooksService;

    /**
     * 查询教学成果奖列表
     */
    @GetMapping("/listAchievements")
    @DataScope(deptAlias = "d", userAlias = "d")
    public TableDataInfo list(JwTeachAchievements jwTeachAchievements) {
        List<JwTeachAchievements> list = jwTeachAchievementsService.selectAllJwTeachAchievements(jwTeachAchievements);
        return getDataTable(list);
    }

    /**
     * 查询竞赛获奖情况列表
     */
    @GetMapping("/listAwards")
    @DataScope(deptAlias = "d", userAlias = "d")
    public TableDataInfo list(JwCompetitionAwards jwCompetitionAwards) {
        List<JwCompetitionAwards> list = jwCompetitionAwardsService.selectAllJwCompetitionAwards(jwCompetitionAwards);
        return getDataTable(list);
    }

    /**
     * 查询课程情况列表
     */
    @GetMapping("/listCourses")
    @DataScope(deptAlias = "d", userAlias = "d")
    public TableDataInfo list(JwCourses jwCourses) {
        List<JwCourses> list = jwCoursesService.selectAllJwCourses(jwCourses);
        return getDataTable(list);
    }

    /**
     * 查询学院荣誉列表
     */
    @GetMapping("/listHonors")
    @DataScope(deptAlias = "d", userAlias = "d")
    public TableDataInfo list(JwTeachHonors jwTeachHonors) {
        List<JwTeachHonors> list = jwTeachHonorsService.selectAllJwTeachHonors(jwTeachHonors);
        return getDataTable(list);
    }

    /**
     * 查询教育教学改革课题情况列表
     */
    @GetMapping("/listProjects")
    @DataScope(deptAlias = "d", userAlias = "d")
    public TableDataInfo list(JwEduReformProjects jwEduReformProjects) {
        List<JwEduReformProjects> list = jwEduReformProjectsService.selectAllJwEduReformProjects(jwEduReformProjects);
        return getDataTable(list);
    }

    /**
     * 查询 教材出版情况列表
     */
    @GetMapping("/listTextbooks")
    @DataScope(deptAlias = "d", userAlias = "d")
    public TableDataInfo list(JwTextbooks jwTextbooks) {
        List<JwTextbooks> list = jwTextbooksService.selectAllJwTextbooks(jwTextbooks);
        return getDataTable(list);
    }
}
